﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;

namespace WatchMyToon
{
    public class SQL_Connector
    {
        public string SendJSON(string jJSON, string jQuery, string jMulti)
        {
            string json = "update=" + jQuery + "&multi=" + jMulti +"&json=" + jJSON;
            byte[] byteArray = Encoding.UTF8.GetBytes(jJSON);

            string URI = "http://optichosts.com/watchmytoon/plugin.php";

            using (WebClient wc = new WebClient())
            {
                wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
                wc.Headers[HttpRequestHeader.Referer] = "http://watchmytoonplugin.com";
                return wc.UploadString(URI, json);
            }
        }
    }
}
